function initData(page_index) {
$.ajax({
		url : $("#Pagination").attr("url"),
		type : "post",
		cache : false,
		data : {
			currentPage : page_index,
			pageSize : $("#Pagination").attr("pageSize"),
			type: $("#type").val(),
			soso: $("#soso").val(),
			beginDate:$("#dpd1").val(),
			endDate:$("#dpd2").val(),
			status:$("#status").val()
		},
		success : function(data) {
			var json=eval("("+data+")");
			$("#Pagination").attr("recordCount",json.page.recordCount);
			$("#expTable").empty(); 			
			var str='';
			for(var i=0;i<json.exps.length;i++){
				var applytime=json.exps[i].applytime;
				if(applytime!=null){
					applytime=applytime.substring(0,10);
				}else{
					applytime='2012-12-12';
				}
				str+='<tr><td><input type="checkbox" class="checkboxes" value="'+json.exps[i].expid+'" ></td><td>'+json.exps[i].name+'</td><td>'+applytime+'</td><td>'+json.exps[i].typename+'</td><td>'+showStatus(json.exps[i].status)
				     +'</td><td>';
				if(json.exps[i].status==1){
					str+='<a target="_blank" href="../experts/showExp?expId='+json.exps[i].expid+'">查看</a> | ';
				}else if(json.exps[i].status==0){
					str+='<a href="showApplyExp?expId='+json.exps[i].expid+'">审批</a> | ';
				}else if(json.exps[i].status==2){
					str+='<a href="showApplyExp?expId='+json.exps[i].expid+'">查看</a> | ';
				}
				str+='<a type="'+json.exps[i].expid+'" onclick="del(this)">删除</a></td></tr>';
			}
			$("#expTable").append(str);
			$.fn.refreshPagination(page_index);
		},
		error : function(xhr) {
			alert("点击过快，正在加载，请稍后再次点击!"+xhr.statusText);
		}
	});
jQuery('#sample_1 .group-checkable').attr("checked", false);
}

function showStatus(obj){
	if(obj==0){
		return '申请中';
	}else if(obj==1){
		return '批准 ';
	}else if(obj==2){
		return '否决';
	}
}

function del(obj){
	if(confirm("确认要删除吗?")){
		$.post("delExp", { expId: obj.type},function(data){
			initData(1);
		});
	}
}